// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(24,3) == 0;
	question = "special";
	text1 = "There are several passes leading through the mountain chain at the south end of the Mera-Tev. This one climbs above you, forming several switchbacks as it ascends steeply to the southwest.";
	text2 = "It's a beautiful sight. A river roars down out of the mountains. The road crosses it at several narrow stone bridges, each of them centuries old.";
	text3 = "At the top of the pass, barely visible through the mist and clouds, you can see an enormous dome. It is the Shaper Citadel, the meeting place of the Council.";
	text4 = "Although you are but a day's hard climb up to the road to the Citadel, it still feels like it is very far away. Between you and there are many guards, all sworn to keep intruders away from the capital of the Shaper nation.";
	text5 = "Oddly, although this is a major route to one of the great outposts of the Shapers, it looks like it has been abandoned. The road is overgrown, and there are rogue tracks everywhere. Even here, the Mera-Tev has been left to fend for itself.";
	action = SET_SDF 24 3 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(24,4) == 0;
	question = "special";
	text1 = "At last, you have found a place that the Shapers have bothered to control. It is a massive stone wall, formed by many tons of huge stone blocks, laboriously dragged here and stacked by battle alphas and serviles.";
	text2 = "There are actual defenses here. Humans, creations, and turrets guard the gateway, keeping the rogues that infest the road below a safe distance away.";
	text3 = "This is the first of the gateways between you and the Shaper Citadel. Somehow, you doubt that you will be allowed to progress any farther.";
	action = SET_SDF 24 4 1;
	code =
		if (gf(100,18) > 0)
			rs(3);
	break;
	
begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = get_sdf(24,5) == 0;
	question = "special";
	text1 = "You reach a large, clear, relatively flat area. Some enterprising people built an inn and a store here, serving the people traveling to and from the Shaper Citadel.";
	text2 = "They have since been abandoned. Once the Shapers stopped sparing the troops to keep this road free of rogues, the people left and the creations moved in. You can hear them in the buildings, gathering rocks for nests and hunting for food.";
	action = SET_SDF 24 5 1;

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = get_sdf(24,6) == 0;
	question = "special";
	text1 = "As you round the corner and walk toward the next steep road up into the mountains, you hear something below you. A hideous, mad shriek that easily echoes up the pass.";
	text2 = "You run to the edge and look down at the route you took earlier. Then you see them. A pack of rogues, rushing up the road after you. They might be tracking you. They might be attacking the friendly soldiers at the gate ahead.";
	text3 = "The pack is led by an enormous, reptilian figure. It looks like a drakon, but it is larger. And it glows. The power within it is so great that it constantly leaks out, heating the air around it.";
	text4 = "It is one of the Unbound, and it is coming your way ...";
	action = SET_SDF 24 6 1;
	code =
		activate_hidden_group(1);
		add_range_to_group(46,50,3);

		place_particle_num(46,18,12,4);		
		place_particle_num(46,19,12,4);		
		place_particle_num(46,20,12,4);		

		set_boss_level(47,1);
		set_boss_level(48,1);
		set_boss_level(49,1);
		set_boss_level(50,1);
	break;

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This sign has been seared by a blast of flame. It's unreadable.";

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This sign says:";
	text2 = "  Creation Care Center";
	text3 = "  Damage repaired, creations stored, reasonable fees.";
	
begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This sign says:";
	text2 = "  Danra's Traveling Gear";
	text3 = "  Because a stitch in time saves you from being horribly killed on the road out in the middle of nowhere.";
	
begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This sign says:";
	text2 = "  The Waving Tankard";	

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Captain Griffin";
	text1 = "You meet the captain in charge of defending the gate. He seems understandably rattled after the Unbound attack. He gives a few orders to the surviving defenders and turns to face you.";
	text2 = "_Don't get many friendly visitors up here anymore. At least, not from the roads below. I'm Captain Griffin. Feel free to rest before you head back down the mountain. I don't think you'll be passing into the Citadel._";
	text5 = "Captain Griffin is constantly giving orders to shore up the defenses and look after the creations. He occasionally removes a small spyglass from a pouch and watches for fresh attackers on the path below.";
	text6 = "_Anything else you want to know? I should get back to work._";
	action = INTRO;

begintalknode 11;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Captain Penrose";
	text1 = "You meet the new captain in charge of defending the gate. He is working to shore up the defenses after the last Unbound attack. He gives a few orders to the defenders and turns to face you.";
	text2 = "_I'm new here. You're the first friendly visitor I've seen. From this side of the gate, I mean. I'm Captain Penrose. Feel free to rest before you head back down the mountain. I don't think you'll be passing into the Citadel._";
	text5 = "Captain Penrose is constantly giving orders to shore up the defenses and look after the creations. He occasionally removes a small spyglass from a pouch and watches for fresh attackers on the path below.";
	text6 = "_Anything else you want to know? I should get back to work._";
	action = INTRO;

begintalknode 12;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Tell me about this pass.";
	text1 = "He thinks, trying to decide what is safe to tell a relative stranger. _This is the only route from the Mera-Tev into the Shaper Citadel. It is the first of several gates. All locked, all guarded._";
	text2 = "_Serious steps are being taken to keep any infection from entering the Citadel. Not even I can open the gate, not unless someone with permission to enter arrives._";

begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Can I get fresh supplies?";
	text1 = "The captain shakes his head. _We are under strict instructions. Keep what little we get for ourselves, to keep the gate secure. If you need supplies, go north to the Nodye Pass. I think that they still have merchants there._";

begintalknode 14;
	state = 10;
	nextstate = 14;
	condition = 1;
	question = "Tell me about the Unbound.";
	text1 = "_There is not much that I can tell you. The attack you saw was the first one we have had up here. Normally, the creatures don't get this far into the Mera-Tev before they see a target._";
	text2 = "_It did interest my superiors that it attacked with other creations._";

begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = gf(100,18) == 0;
	question = "I want to pass through the gate.";
	text1 = "He removes a scroll from a pouch and reads it. It has a list of names on it. It is a very short list. He shakes his head.";
	text2 = "_This list has not changed in weeks. Nobody on it ever shows up. You are not on it. There is no way that you are entering the Shaper Citadel today._";

begintalknode 16;
	state = 10;
	nextstate = -1;
	condition = gf(100,18) > 0 && gf(24,7) == 0;
	question = "I want to pass through the gate. I think you will find that I have permission.";
	text1 = "He removes a scroll from a pouch and unrolls it. It has a list of names on it. _I received a replacement scroll last week, but there haven't been any ..._ He stops speaking and stares at the last name on the list.";
	text2 = "_Well. This is the first time that this has happened. You are on the list._";
	text3 = "He walks to the gate, a ten foot high slab of stone in the huge wall. He slaps the gate with his hand and shouts your name. Then he returns to you.";
	text4 = "_I think that is what I am supposed to do. You can try to enter the Citadel now. If you don't succeed, don't be surprised._";
	action = END_TALK;
	code =
		sf(24,7,1);
	break;

begintalknode 17;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "I'd like to know more about the Shaper Citadel.";
	text1 = "_And I would like to tell you. It is glorious. It is a testimonial to all that is strong and wise about the Shapers._";
	text2 = "_However, I can't tell you anything about it. Orders. In these, times, knowledge about the Citadel is well-guarded._";

begintalknode 18;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "What did you mean by not letting infection into the Citadel?";
	text1 = "_The rebels have created all sort of vile and dangerous creations. Creations that kill indiscriminately. That madden the mind. That hide and reproduce. Some think that they are even making new diseases._";
	text2 = "_Their sickness will be kept out of the Citadel and the coastal provinces as long as possible._";

begintalknode 19;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "You can't open the gate?";
	text1 = "_No, not unless someone on my list arrives. Otherwise, the magical bonds seal it. It is necessary to keep the Citadel secure. Even if the rogues are destroying us, we must sacrifice ourselves to keep them out here._";
	
begintalknode 20;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "How do you get reinforcements and supplies?";
	text1 = "This line of questioning makes him nervous. All he says is, _Of course, they can open the gate from the other side. We are reinforced on a schedule._";

begintalknode 21;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Why don't you clear the rogues out of the pass?";
	text1 = "For a brief moment, the soldier's desire to gossip outweighs his caution.";
	text2 = "_Two reasons. First, there is no point. Nobody is allowed through the gate, so there is no point in letting them get here._";
	text3 = "_Second, we have not been ordered to. I don't know why. I have heard rumors of Astoria being left to her own devices by the rest of the Council, due to certain unsavory tactics she has been pursuing. I know nothing else._";

begintalknode 22;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Why don't they make it this far?";
	text1 = "_They are savage and seem to think very little. They wander until they find a settlement. Then they attack it, doing as much damage as they can before they are killed._";
	text2 = "_A few of them seem to be smarter. They are hiding in the Mera Fen below. They emerge, attack, and flee. So far, though, none of them have kept from getting distracted long enough to reach this gate._";

begintalknode 23;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Why don't the Unbound usually fight alongside other creations?";
	text1 = "_They are unstable. There is something in their nature that keeps them from attacking each other or other drakons._";
	text2 = "_However, other creations, even friendly ones, will irritate them eventually. And then they attack. Rebel serviles have been found bearing the signs of Unbound attack. Hating the Shapers did not save them._";

begintalknode 27;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "You try to speak with one of the soldiers, but they are all preparing to defend against the attacking rogues. One of them shouts, _Who are you? Doesn't matter. Help us fight or get out of the way!_";


begintalknode 28;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "You examine one of the creations on guard at the gate. It is large, well-made, and under complete control. It doesn't respond to your presence. It just stares off into space, waiting for its next meal or its next order.";

begintalknode 29;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = "The soldiers guarding this side of the gate are quite nervous. Speaking with them, you soon find out why. The gate is sealed. It will only be opened when their replacements are sent out.";
	text2 = "They don't want to risk getting in trouble by telling you more. They suggest that you speak with Captain Griffin.";
	text3 = "They don't want to risk getting in trouble by telling you more. They suggest that you wait until a new officer is sent out.";
	text4 = "They don't want to risk getting in trouble by telling you more. They suggest that you speak with Captain Penrose, their new superior.";
	code =
		rs(2); rs(3); rs(4);
		if (char_ok(40) == FALSE)
			as(3);
			else if (gf(24,9) > 0)
				as(4);
				else as(2);
	break;
	
//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 34;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 35;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 39;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 40;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 41;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 42;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 43;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 44;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		